home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-27 | 1.6 KB | 40 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 0934247 23-April-90 14:49PDT
-
- From: ALGER Alger, Jeff,VCA
-
- To: PASCOE1 Pascoe, Geoff
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Re: GC in C++ vs. Object…
-
- Geoff,
-
- You are right that garbage collection is a major headache regardless of
- platform. HOWEVER, I can attest from personal experience that C++ at least
- makes it a LOT easier to leave the interface frozen from the rest of the
- application while slipping whatever strategy you desire "under the sheets." In
- a project I am working on now, we froze the interface very early on for a dumb,
- memory-hogging version, and are now overriding the "new" operator on a class
- level to throw in both generational AND mark-and-sweep GC with NO CHANGE to the
- rest of the program. While retaining pointer-based objects, we moved them off
- the stack into blocks over which we have control with just a few lines of code,
- avoiding the worst of the headaches you describe.
-
- An analogous solution in OP would be the so-called "pseudo-object" strategy,
- wherein control of allocation and deallocation of memory is wrested from the
- memory manager. However, in OP you have to have the application know that this
- is taking place so that the right allocator is called; the strategy is not just
- in the classes themselves.
-
- Having collected garbage in both languages, I stand by the assertion that C++
- makes life a lot easier, even if it doesn't do the whole job for you.
-
- Regards,
- Jeff Alger
- Exis
- A Technology Firm of KPMG Peat Marwick
-
-